package org.garbagecan.quartzstudy.listener;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.quartz.JobListener;

public class MyJobListener implements JobListener{
    
    private static Log log = LogFactory.getLog(MyJobListener.class);
    
    private String name;
    
    public MyJobListener(String name) {
        this.name = name;
    }
    
    public String getName() {
        return this.name;
    }

    public void jobToBeExecuted(JobExecutionContext arg0) {
        log.info("jobToBeExecuted");
    }

    public void jobExecutionVetoed(JobExecutionContext arg0) {
        log.info("jobExecutionVetoed");
    }

    public void jobWasExecuted(JobExecutionContext arg0, JobExecutionException arg1) {
        
        log.info("jobWasExecuted");
    }
}
